
// 确认框
export function confirm(content: string, title = "提示", args: any) {
  uni.showModal({
    content,
    title,
    confirmText: args.confirmText,
    cancelText: args.cancelText,
    confirmColor: args.confirmColor || "#87cefa",
    cancelColor: args.cancelColor,
    success: (res: any) => {
      if (res.confirm) {
        args.onConfirm && args.onConfirm();
      } else if (res.cancel) {
        args.onCancel && args.onCancel();
      }
    },
  });
}
